export default {
  checkMobile (data) {
    const reg = /^\d{11}$/
    return reg.test(data)
  },
  checkMoney (data) {
    if (typeof data != 'string') {
      data = data.toString()
    }
    const reg = /((^[1-9]\d*)|^0)(\.\d{1,2}){0,1}$/
    return !reg.test(data)
  },
  checkMail (data) {
    const reg = /[\w]+@[a-zA-Z0-9]+(\.[A-Za-z]{2,4}){1,2}/
    return !reg.test(data)
  },
  checkTel (data) {
    const reg = /0\d{2,3}-\d{7,8}/
    return !reg.test(data)
  }
}